<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<%
	String path = request.getContextPath();
%>
<title>报表展示</title>
<link rel="stylesheet" type="text/css"
	href="<%=path%>/css/btn_class.css" />
<link rel="stylesheet" type="text/css"
	href="<%=path%>/extjs/resources/css/ext-all.css" />
<link rel="stylesheet" type="text/css" href="<%=path%>/extjs/style.css" />
<script type="text/javascript"
	src="<%=path%>/extjs/adapter/ext/ext-base.js"></script>
<script type="text/javascript" src="<%=path%>/extjs/ext-all.js"></script>
<script language="JavaScript" src="../../flash/FusionCharts.js"></script>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>

	<style type="text/css">
	
    </style>

<body bgcolor='#FFFFFF'>
	<script type="text/javascript">
	Ext.BLANK_IMAGE_URL = "<%=path%>/extjs/resources/images/default/s.gif";
	function demo(obj) {
		var chart_detail_window = new top.Ext.Window({
			
			width : 800,
			height : 500,
			title : '评分变化曲线',
			iconCls : 'sy-win-flag',
			modal : true,
			items : [ new top.Ext.Panel(
					{
						height : 400,
						html : '<html><head></head><body><iframe name="ifr_jcwh" align="center" id="ifr_jcwh" scrolling="false" frameborder="0" width="100%" height="100%" '
							+ 'src="menu/hlgz/xtgl_yhgl.jsp"></iframe></body></html>'
					})]
		});
		chart_detail_window.show();
			//document.getElementById("tt").innerHTML = "esponseText";
		}
	Ext.onReady(function() {
		
		//日工作量统计图
	  	Ext.Ajax.request({
	  		url : 'chartInfo!produceChartDataCommon.do',
			method : 'POST',
			params : {
				"fbh" : 'MCD304'
			},
			success : function(response, action) {
				var data_str = new Array(); //定义一数组
				var responseText = response.responseText;
				
				data_str = responseText.split("##"); //字符分割      
				var chart_data = data_str[1]; //
				var chart_style = data_str[0]; //
				chart_style = chart_style.replace(/\r\n/g,''); 
				//alert(chart_style);
				if(chart_style == "1") {
					chart = new FusionCharts("../../flash/baseCharts/Column3D.swf","chartid","550","300","0","1");
				} else if(chart_style == "2") {
					chart = new FusionCharts("../../flash/baseCharts/AngularGauge.swf","myChartId", "550", "300", "0", "0");
				} else if(chart_style == "3") {
					chart = new FusionCharts("../../flash/baseCharts/Line.swf","chartid","550","300","0","1");
				} else if(chart_style == "4") {
					chart = new FusionCharts("../../flash/baseCharts/MSLine.swf","chartid","550","300","0","1");
				} else if(chart_style == "5") {
					chart = new FusionCharts("../../flash/baseCharts/Doughnut3D.swf","chartid","550","300","0","1");
				} else {
					chart = new FusionCharts("../../flash/baseCharts/Bar2D.swf","chartid","550","300","0","1");
				}
			  	chart.setDataXML(chart_data);
			  	//chart.render("chart1");
			},
			// 提交失败的回调函数
			failure : function() {
				Ext.Msg.alert('错误', '服务器出现错误请稍后再试！');
			}
		});
		
	});
	</script>
	<table><tr><td id="tt">
	<div id="chart1" name="chart1" align=center style="border:1px solid #718da6;width:300px;height:300px;" onclick="demo(this);">ddd</div>
</td></tr></table>
	
</body>
</html>